﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AvansRS.Domain;
using FluentNHibernate.Mapping;

namespace AvansRS.Data.Mapping
{
    public class AccountMap : ClassMap<Account>
    {
        public AccountMap()
        {
            Id(x => x.ID);
            Map(x => x.UserName)
                .Unique();
            Map(x => x.Email);
            Map(x => x.Password);
            Map(x => x.ResetKey);
            HasManyToMany(x => x.Rights)
                .AsBag();            
        }

    
    }
}
